package com.ygqh.baby.service;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.CommentType;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.CommentCountModel;
import com.ygqh.baby.model.YgPublishCommentModel;
import com.ygqh.baby.po.YgPublishComment;

public interface YgPublishCommentService {

	List<YgPublishComment> find();

	int findCount();

	YgPublishComment findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(YgPublishComment ygPublishComment);

	int update(YgPublishComment ygPublishComment);

	int saveOrUpdate(YgPublishComment ygPublishComment);

	ResultSet<YgPublishComment> search(QueryInfo queryInfo, String q, Long id, String checkStatus, Date startTime, Date endTime);

	/**
	 * 获取点赞 评论数
	 * 
	 * @param commentType
	 * @param publishIds
	 * @return
	 */
	List<CommentCountModel> findCountByPublishIds(CommentType commentType, Long[] publishIds);

	List<YgPublishCommentModel> findCommentByPublishId(Long publishId);

	void pushNice(YgPublishComment comment, Long receiverId);

	Long[] findPublishIdsByUser(Long userId);

	/**
	 * 批量审核晒单评论
	 * 
	 * @param checkStatus
	 * @param ids
	 * @return
	 */
	int updateBatchChechStatus(String checkBy, String checkStatus, Long[] ids);

	void sendMessage(YgPublishComment comment, Long receiverId);

	/**
	 * 
	 * @param publishId
	 * @return 按评论类型。评论人分组，
	 */
	List<YgPublishComment> findByPublishId(Long publishId);

}
